﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.IO.Compression;

namespace Auction
{
    public partial class FormBase : Form
    {
        public FormBase()
        {
            InitializeComponent();
        }

        private void FormBase_Load(object sender, EventArgs e)
        {

        }

        public virtual void TransferBidderFound(Bidder aBidder)
        {

        }
        public virtual void TransferPackageFound(Package apackage)
        {
            
        }
        public virtual void TransferWorkFound(WorkOfArt workFound)
        {
            
        }
        public virtual void TransferAuctionFound(Auction auction)
        {
           
        }

        public void ControlesHabilitados(bool estado)
        {
            foreach (Control ctrl in this.Controls)
            {
                if (ctrl is TextBox || ctrl is GroupBox || ctrl.Name=="b_save")
                {
                    ctrl.Enabled = estado;

                }
                else
                {
                    ControlesHabilitados(ctrl, estado);
                }
            }
        }

        private void ControlesHabilitados(Control control, bool estado)
        {
            foreach (Control ctrl in control.Controls)
            {
                if (ctrl is TextBox || ctrl is GroupBox)
                {
                    ctrl.Enabled = estado;
                }
                else
                {
                    ControlesHabilitados(ctrl, estado);
                }
            }
        }
    }
}
